package LeetCode.month03.day90;

/**
 * @author 16778
 * @date 2025/10/30 8:15
 * @description
 */
public class No1526 {
    int res = 0;
    public int minNumberOperations(int[] target) {
        int res = target[0];
        for (int i = 1; i < target.length; i++) {
            if (target[i] > target[i - 1]) {
                res += target[i] - target[i - 1];
            }
        }
        return res;
    }

}
